package com.p24.info;

import java.io.UnsupportedEncodingException;

import com.p24.http.URLEncoding;
import com.p24.info.constants.P24InfoConstants;

public class P24InfoMfo extends P24Info {

	public P24InfoMfo(String root, String subDir, String bankName, String bankMfo) {
		super(root, subDir);
		try {
			this.bankName = URLEncoding.encode(new String(bankName.getBytes("UTF-8")));
			this.bankMfo = URLEncoding.encode(new String(bankMfo.getBytes("UTF-8")));
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}
	
	public String getURL() {
		return super.getURL() + P24InfoConstants.OPER + "=" + P24InfoConstants.PRP +
			"&" + P24InfoConstants.BANK + "=" + bankName + 
			"&" + P24InfoConstants.MFO + "=" + bankMfo +
			"&" + P24InfoConstants.PUREXML + "=";
	}
	
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public String getBankName() {
		return bankName;
	}

	public void setBankMfo(String bankMfo) {
		this.bankMfo = bankMfo;
	}

	public String getBankMfo() {
		return bankMfo;
	}

	private String bankName = "";
	private String bankMfo = "";
}
